package com.zzl.car.context;

//自定义一个统一的响应体数据格式
public class ZdpResponseBody<T> {
    private int code;
    private String msg;
    private T data;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public T getData() {
        return data;
    }

    public ZdpResponseBody(T data){
        this(ZdpResultCode.SUCCESS,data);
    }
    public ZdpResponseBody(ZdpResultCode resultCode, T data){
        code = resultCode.getCode();
        msg = resultCode.getMsg();
        this.data = data;
    }
    public ZdpResponseBody(int code, String msg, T data){
        this.code = code;
        this.msg = msg;
        this.data = data;
    }


}
